package com.king.designpatterns.行为模式.责任链模式;

/**
 * 具体传花者
 *
 * @author king
 * @date 2021-06-10 15:52
 */
public class PlayerA extends Player{

    public PlayerA(Player successor) {
        setSuccessor(successor);
    }

    @Override
    public void handle(int i) {
        if (1 == i){
            System.out.println("PlayerA 喝酒！");
        }else{
            System.out.println("PlayerA 把花向下传！");
            next(i);
        }
    }
}
